package Calculator;

import javax.swing.*;
import java.awt.*;
import java.net.URL;

public class button_tu_pin extends JFrame {
    public button_tu_pin(){
        JButton label = new JButton("x^2");
        URL url = button_tu_pin.class.getResource("xx.jpg");

        if(url != null) {
            Icon icon = new ImageIcon(url);
            label.setIcon(icon);
            label.setHorizontalAlignment(SwingConstants.CENTER);
        }
        Container container = getContentPane();
        container.add(label);

        setVisible(true);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setBounds(100,100,200,200);
    }

    public static void main(String[] args){

        new button_tu_pin();
    }
}




